import request from '@/utils/request'

// 查询订单信息列表
export function listTransport(query) {
  return request({
    url: "/api/system/transport/platform",
    method: "get",
    params: query,
  });
}

// 查询订单信息详细
export function dispatchInfo(id) {
  return request({
    url: "/api/partner/service/system/dispatchInfo/" + id,
    method: "get",
  });
}

// 新增订单信息
export function addDispatch(data) {
  return request({
    url: "/api/partner/service/system/addDispatch",
    method: "post",
    data: data,
  });
}

// 修改订单信息
export function updateDispatch(data) {
  return request({
    url: "/api/partner/service/system/updateDispatch",
    method: "post",
    data: data,
  });
}

/**
 * 删除调度信息
 * @param {string|number|Array<string|number>} id 调度ID，支持单个或逗号分隔的多个ID
 * @returns {Promise<any>} 请求Promise
 */
export function delOrder(id) {
  return request({
    url: "/api/partner/service/system/delectDispatch/" + id,
    method: "get",
  });
}
